package org.eclipse.wst.server.preview.openejb.jetty.loader;

import org.apache.openejb.loader.SystemInstance;
import org.mortbay.jetty.Server;

/**ServerHolder : The only functionally of this class is 
 * hold the Jetty web server instance created in the 
 * PreviewStarter class. And after, this instance of Jetty 
 * is required by the class OpenEJBLoader, which will 
 * use this instance to get all web application deployed 
 * on it. The OpenejbWebappBinder class will search for 
 * web modules inside these web applications. 
 * 
 * @author Marcelo de Oliveira Dias
 *
 */

public class ServerHolder {
	private static Server jettyServer;
	
	public static void setServer( Server server ){
		jettyServer = server;
	}
	
	public static Server getServer(){
		return jettyServer;
	}
	
	private static SystemInstance instance;
	
	public static SystemInstance getEjbInstance(){
		return instance;
	}
	
	public static void setEjbInstance( SystemInstance ejb ){
		instance = ejb;
	}
}
